//
// Created by cube on 2020/9/12.
//

#ifndef COMPILERDOMEA1_AGREEMENT_H
#define COMPILERDOMEA1_AGREEMENT_H

#include <iostream>
#include <map>

enum class CommandType : uint8_t {
    None_Type,

    SendData_Type,

    ReAck_Type,
    ReAcks_Type,

    Stop_Type,
    Start_Type,
};

struct CommandHead{
    uint8_t         id;
    uint32_t        time;
};

struct CommandOnlyHead{
    uint32_t        time;
};

struct CommandBase{
    CommandType     type;
};

struct SendData : public CommandBase{
    uint32_t len;
};

struct ReAck : public CommandBase{
    uint32_t id;
};

struct ReAcks : public CommandBase{
    uint16_t count;
};

struct Stop_Command : public CommandBase{};
struct Start_Command : public CommandBase{};

#endif //COMPILERDOMEA1_AGREEMENT_H
